Publishing a blog post with Eleventy (11ty) follows a standard Jamstack workflow. Since 11ty is a static site generator, the process is less about clicking "Publish" in a dashboard and more about managing files and version control.
Here are the most common steps for publishing a blog post:

1. Create a New Content File

Most 11ty blogs use Markdown for content. You typically create a new file in your posts directory (e.g., src/posts/).

  • Filename: Usually formatted as YYYY-MM-DD-title.md or just title.md.
  • Front Matter: At the top of the file, you define metadata in YAML format between triple dashes.
    YAML
    ---
    title: "My New Blog Post"
    date: 2026-02-03
    tags: ["eleventy", "webdev"]
    layout: layouts/post.njk
    ---
    Your blog content goes here...

2. Local Preview and Testing

Before going live, you run 11ty’s built-in development server to check your formatting and layout.

  • Command: npx @11ty/eleventy --serve (or npm start if you have it scripted in package.json).
  • Action: Visit http://localhost:8080 in your browser. Eleventy features "hot reloading," so any changes you save to your Markdown file will appear instantly.

3. Build for Production (Optional if Automated)

You can manually generate the final HTML files to see exactly what will be uploaded.

  • Command: npx @11ty/eleventy
  • Result: This populates your output folder (usually _site/ or public/) with static HTML, CSS, and images.

4. Push to Version Control

The "publishing" trigger for most 11ty users is a simple Git command.

  • Action: Commit your new post and push it to a repository like GitHub or GitLab.
    Bash
    git add .
    git commit -m "Add new post: My New Blog Post"
    git push origin main

5. Automated Deployment

Most developers connect their GitHub repository to a hosting provider like Netlify, Vercel, or Cloudflare Pages.

  • Continuous Deployment: Once you push your code, the host detects the change, automatically runs the build command (npx @11ty/eleventy), and serves the updated static files to the web.
  • Wait Time: Your post is usually live within 30–60 seconds of your Git push.

---

Pro-Tip: Handling Drafts

If you aren't ready to publish, many 11ty setups use a draft: true flag in the front matter. You can configure your .eleventy.js file to exclude any files with this flag during the production build, while still showing them during local development.
Would you like me to help you set up a "Drafts" system or an automated deployment script for your blog?